package day02;

import static java.lang.Math.pow;

public class homeworkwhile02 {
    public static void main(String[] args) {
        double init=0.001;
        double high=8848.86;
        int frequency = frequency_compute(init,high);
        System.out.println("需要折"+frequency+"次");
    }

    public static int frequency_compute(double i,double j) {
        int count=0;
        while (true){
            if ((i*pow(2,count)) >= j){
                break;
            }
            count++;
        }
        return count;
    }
}
